<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" charset="utf-8" src="js/cordova-2.1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="js/PhoneGapBase64.js"></script>
<title>Insert title here</title>
</head>
<body>
	<input type="text" name = "inputString" id = "textBox"><br>
	<input type="button" value = "Click" onclick = "clickMe();"></input>
	<script type="text/javascript">

		
		function callEncode(input)
		{
			PhoneGapBase64.encode(callEncodeSuccess, callEncodeFailure, input);
		}
		
		function callEncodeSuccess(result)
		{
			alert('Success: ' + result);
		}
		
		function callEncodeFailure()
		{
			alert('Failure');
		}
		
		function clickMe(){
			var input = document.getElementById('textBox').value;
			callEncode(input);
		};
	</script>
</body>
</html>